﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Spring.Data.NHibernate.Support;
using Hospital.Model;
using System.Collections;
using System.Data;

namespace Hospital.Dao.IDao
{
    public interface IUserDao
    {
        /// <summary>
        /// Find all users
        /// </summary>
        /// <returns></returns>
        IList<User> GetAllUsers();

        /// <summary>
        /// Find a user by id
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        User GetUserById(int Id);

        /// <summary>
        /// Add user
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        bool AddUser(User user);

        /// <summary>
        /// Update user
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        bool UpdateUser(User user);

        /// <summary>
        ///Add or update a user
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        bool AddOrUpdateUser(User user);

        /// <summary>
        /// Delete user
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        bool DeleteUser(User user);

        /// <summary>
        /// Get all user
        /// </summary>
        /// <returns></returns>
        DataTable GetAllUser();

        /// <summary>
        /// 根据登录名获取用户
        /// </summary>
        /// <param name="strUserName"></param>
        /// <returns></returns>
        User GetUserByName(string strUserName);
    }
}
